package net.ming616.pattern.factory.simplefactory;

import net.ming616.pattern.factory.product.BaseProduct;

public class Client {

	BaseProduct product;

	public BaseProduct getProduct(String productName) {
		this.product = SimpleFactory.create(productName);
		return this.product;
	}

	public static void main(String[] args) {
		Client client = new Client();
		BaseProduct product = client.getProduct("A");
		System.out.println("I got a product named " + product.toString());
	}

}
